import request from '@/utils/request'

// 查询视频监控列表
export function listCamera(query) {
  return request({
    url: '/tongban/camera/list',
    method: 'get',
    params: query
  })
}

export function againCreateUrl(id, loseTime) {
  console.log(id)
  let query ={cameraId:id,loseTime:loseTime}
  return request({
    url: '/tongban/camera/againCreateUrl',
    method: 'get',
    params: query
  })
}

// 查询视频监控详细
export function getCamera(cameraId) {
  return request({
    url: '/tongban/camera/' + cameraId,
    method: 'get'
  })
}

// 新增视频监控
export function addCamera(data) {
  return request({
    url: '/tongban/camera',
    method: 'post',
    data: data
  })
}

// 修改视频监控
export function updateCamera(data) {
  return request({
    url: '/tongban/camera',
    method: 'put',
    data: data
  })
}

// 删除视频监控
export function delCamera(cameraId) {
  return request({
    url: '/tongban/camera/' + cameraId,
    method: 'delete'
  })
}

// 导出视频监控
export function exportCamera(query) {
  return request({
    url: '/tongban/camera/export',
    method: 'get',
    params: query
  })
}
